
//
// 100108 - AH - Created.
//

package org.soekrat.engine.forest;

/**
 * <p>
 *   {@link TreeVisitor} that simply prints the names on attributes trees in a
 *   forest have for test purposes.
 * </p>
 * @author Arne Halvorsen (AH)
 * @author Laetitia Le Chatton (LLC)
 */
public final class PrintAttributeNamesTreeVisitor implements TreeVisitor 
{
  /**
   * <p>
   *   Single shared instance.
   * </p>
   */
  public static TreeVisitor INSTANCE=new PrintAttributeNamesTreeVisitor();
  
  // Singleton pattern dictates private constructor.
  private PrintAttributeNamesTreeVisitor(){} 

  // Specified in TreeVisitor.
  public void visit(Tree tree) 
  {
    System.out.println(tree.attributeNamesToString());
  }

}
